<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
          name="viewport">
    <meta content="ie=edge" http-equiv="X-UA-Compatible">
    <title>Document</title>
</head>
<body>
<div id="root">

</div>
<script>
    let garde = prompt('请输入成绩')
    switch (true) {
        case garde >= 90 && garde <= 100:
            alert("成绩优秀");
            break;
        case garde >= 70 && garde < 80:
            alert("成绩优良");
            break;
        case garde >= 60 && garde < 70:
            alert("成绩及格");
            break;
        case garde >= 0 && garde < 60:
            alert("成绩不及格");
            break;
        default:
            alert("输入异常")
    }

    if (garde >= 90 && garde <= 100) {
        alert("成绩优秀");
    } else if (garde >= 70 && garde < 80) {
        alert("成绩优良");
    } else if (garde >= 60 && garde < 70) {
        alert("成绩及格");
    } else if (garde >= 0 && garde < 60) {
        alert("成绩不及格");
    } else {
        alert("输入异常")
    }
</script>

</body>
</html>